#include <cstring>
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int n;
	scanf("%d",&n);
	int a[n+10];
	int num1 = 0,num2 = 0,sign1,sign2;
	for(int i = 1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]%2)
		{
			num1++;
			sign1 = i;
		} 
		else
		{
			num2++;
			sign2 = i;
		} 
	}
	if(num1 == 1) printf("%d\n",sign1);
	else printf("%d\n",sign2);
}
